package voronin;

import java.net.Socket;
import java.util.concurrent.TimeUnit;

public class SocketPoolFactory implements PoolFactory<Socket> {
    @Override
    public ConnectionPoolService<Socket> newConnectionPool(int capacity, ConnectionSource<Socket> src) {
        return new ConnectionPoolService<Socket>(capacity, capacity, 0, TimeUnit.SECONDS, src);
    }

    @Override
    public ConnectionPoolService<Socket> newConnectionPool(int init, int max, long keepAliveTime, TimeUnit unit, ConnectionSource<Socket> src) {
        return new ConnectionPoolService<Socket>(init, max, keepAliveTime, unit, src);
    }
}
